# coding=utf-8
__author__ = 'liubin'

import os
import uuid

#订单状态
order_states = {'ordered': u'已下单',
                'delivered': u'已送达',
                'cancelled': u'已取消'}


#文件名->UUID
def namegen_uuid(obj, file_data):
    """
        Generate secure filename for uploaded file.
    """
    ext = os.path.splitext(file_data.filename)[1]
    return uuid.uuid4().hex  + ext